/*
 * Powered By dico
 * Since 2017 - 2018
 */
package com.seeyoui.kensite.framework.oa.applyActivity.persistence;

import com.seeyoui.kensite.common.base.domain.EasyUIDataGrid;
import com.seeyoui.kensite.framework.oa.applyActivity.domain.ApplyActivity;
import com.seeyoui.kensite.framework.oa.leave.domain.Leave;

import java.util.*;

import com.seeyoui.kensite.common.exception.CRUDException;

/**
 * ApplyActivity
 * @author dico
 * @version 2.0
 * @since 1.0
 * @date 2018-01-05
 */

public interface ApplyActivityMapper {

	/**
	 * 根据ID查询单条数据
	 * @param id
	 * @return
	 */
	public ApplyActivity findOne(String id);
	
	/**
	 * 查询审批通过未开始的活动清单
	 * @return
	 */
	public List<ApplyActivity> listPassNotStart();
	
	/**
	 * 查询最近一条未开始三会一课数据
	 * @return
	 */
	public ApplyActivity findMeeting();
	
	/**
	 * 三会一课、党员活动更多接口
	 * @param map
	 * @return
	 */
	public List<ApplyActivity> listTypeAndState(Map<String, Object> map);
	
	/**
	 * 查询最近一条未开始党员活动数据
	 * @return
	 */
	public ApplyActivity findActivity();
	
	/**
	 * 查询数据集合
	 * @param applyActivity
	 * @return
	 */
	public List<ApplyActivity> findList(ApplyActivity applyActivity);
	
	/**
	 * 查询所有数据集合
	 * @param applyActivity
	 * @return
	 */
	public List<ApplyActivity> findAll(ApplyActivity applyActivity);
	
	/**
	 * 查询数据总数
	 * @param applyActivity
	 * @return
	 */
	public int findTotal(ApplyActivity applyActivity);

	/**
	 * 查询数据总数排除当前数据
	 * @param applyActivity
	 * @return
	 */
	public int findExTotal(ApplyActivity applyActivity);
	
	/**
	 * 数据新增
	 * @param applyActivity
	 */
	public void save(ApplyActivity applyActivity);
	
	/**
	 * 数据修改
	 * @param applyActivity
	 */
	public void update(ApplyActivity applyActivity);
	
	/**
	 * 数据删除
	 * @param listId
	 */
	public void delete(List<String> listId);
	
	/**
	 * 数据假删除
	 * @param applyActivity
	 */
	public void remove(ApplyActivity applyActivity);
	
	// 下面方法为流程申请相关
	/**
	 * 根据ID查询单条数据
	 * @param id
	 * @return
	 */
	public ApplyActivity findApplyActivityById(String id);
	
	/**
	 * 查询数据集合
	 * @param leave
	 * @return
	 */
	public List<ApplyActivity> findApplyActivityList(ApplyActivity applyActivity);
	
	/**
	 * 查询数据总数
	 * @param userinfo
	 * @return
	 */
	public EasyUIDataGrid findApplyActivityListTotal(ApplyActivity applyActivity);
	
	/**
	 * 数据新增
	 * @param leave
	 */
	public void saveApplyActivity(ApplyActivity applyActivity);
	
	/**
	 * 数据修改
	 * @param leave
	 */
	public void updateApplyActivity(ApplyActivity applyActivity);
	
	/**
	 * 数据删除
	 * @param listId
	 */
	public void deleteApplyActivity(List<String> listId);
	
	/**
	 * 更新流程实例ID
	 * @param leave
	 * @return
	 */
	public int updateBindid(ApplyActivity applyActivity);
	
	/**
	 * 根据流程实例ID查询数据
	 * @param bindId
	 * @return
	 */
	public ApplyActivity findApplyActivityByBindId(String bindId);
	
}